﻿using UnityEngine;
using System.Collections;

public class MonsterController : MonoBehaviour
{
    private Transform monster;
    // Use this for initialization
    void Start ()
    {
        //创建怪物并将怪物设为子物体
        for (int i=0; i<GlobalManager.level+2; i++)
        {
            monster = (Transform)Instantiate (GameController.gameController.PrefabMonster, this.transform.position, this.transform.rotation);
            monster.parent = this.transform;
        }

    }

    //改变子物体怪物状态
    public void Dangers ()
    {
        this.gameObject.BroadcastMessage ("Danger");
    }


}
